3.904 \(\int \frac{1}{a-b+2 a x^2+a x^4} \, dx\)

Optimal. Leaf size=109 \[ \frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}-\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}-\sqrt{b}}}-\frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}+\sqrt{b}}} \]

[Out]

ArcTan[(a^(1/4)*x)/Sqrt[Sqrt[a] - Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] - Sqrt[b]]*Sqrt[b]) - ArcTan[(a^(1/4)*x)/S
qrt[Sqrt[a] + Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] + Sqrt[b]]*Sqrt[b])

________________________________________________________________________________________

Rubi [A]  time = 0.0467918, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {1093, 205} \[ \frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}-\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}-\sqrt{b}}}-\frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{b} \sqrt{\sqrt{a}+\sqrt{b}}} \]

Antiderivative was successfully verified.

[In]

Int[(a - b + 2*a*x^2 + a*x^4)^(-1),x]

[Out]

ArcTan[(a^(1/4)*x)/Sqrt[Sqrt[a] - Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] - Sqrt[b]]*Sqrt[b]) - ArcTan[(a^(1/4)*x)/S
qrt[Sqrt[a] + Sqrt[b]]]/(2*a^(1/4)*Sqrt[Sqrt[a] + Sqrt[b]]*Sqrt[b])

Rule 1093

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{a-b+2 a x^2+a x^4} \, dx &=\frac{\sqrt{a} \int \frac{1}{a-\sqrt{a} \sqrt{b}+a x^2} \, dx}{2 \sqrt{b}}-\frac{\sqrt{a} \int \frac{1}{a+\sqrt{a} \sqrt{b}+a x^2} \, dx}{2 \sqrt{b}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}-\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{\sqrt{a}-\sqrt{b}} \sqrt{b}}-\frac{\tan ^{-1}\left (\frac{\sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{b}}}\right )}{2 \sqrt [4]{a} \sqrt{\sqrt{a}+\sqrt{b}} \sqrt{b}}\\ \end{align*}

Mathematica [A]  time = 0.0628166, size = 105, normalized size = 0.96 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{a-\sqrt{a} \sqrt{b}}}\right )}{2 \sqrt{b} \sqrt{a-\sqrt{a} \sqrt{b}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{\sqrt{a} \sqrt{b}+a}}\right )}{2 \sqrt{b} \sqrt{\sqrt{a} \sqrt{b}+a}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a - b + 2*a*x^2 + a*x^4)^(-1),x]

[Out]

ArcTan[(Sqrt[a]*x)/Sqrt[a - Sqrt[a]*Sqrt[b]]]/(2*Sqrt[a - Sqrt[a]*Sqrt[b]]*Sqrt[b]) - ArcTan[(Sqrt[a]*x)/Sqrt[
a + Sqrt[a]*Sqrt[b]]]/(2*Sqrt[a + Sqrt[a]*Sqrt[b]]*Sqrt[b])

________________________________________________________________________________________

Maple [A]  time = 0.139, size = 74, normalized size = 0.7 \begin{align*} -{\frac{a}{2}{\it Artanh} \left ({ax{\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) a}}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}-a \right ) a}}}}-{\frac{a}{2}\arctan \left ({ax{\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) a}}}} \right ){\frac{1}{\sqrt{ab}}}{\frac{1}{\sqrt{ \left ( \sqrt{ab}+a \right ) a}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*x^4+2*a*x^2+a-b),x)

[Out]

-1/2/(a*b)^(1/2)/(((a*b)^(1/2)-a)*a)^(1/2)*arctanh(a*x/(((a*b)^(1/2)-a)*a)^(1/2))*a-1/2/(a*b)^(1/2)/(((a*b)^(1
/2)+a)*a)^(1/2)*arctan(a*x/(((a*b)^(1/2)+a)*a)^(1/2))*a

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{a x^{4} + 2 \, a x^{2} + a - b}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x^4+2*a*x^2+a-b),x, algorithm="maxima")

[Out]

integrate(1/(a*x^4 + 2*a*x^2 + a - b), x)

________________________________________________________________________________________

Fricas [B]  time = 1.50551, size = 1115, normalized size = 10.23 \begin{align*} -\frac{1}{4} \, \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} \log \left ({\left (b - \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} + x\right ) + \frac{1}{4} \, \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} \log \left (-{\left (b - \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{-\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b - b^{2}}} + x\right ) - \frac{1}{4} \, \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} \log \left ({\left (b + \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} + x\right ) + \frac{1}{4} \, \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} \log \left (-{\left (b + \frac{a^{2} b - a b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}}\right )} \sqrt{\frac{\frac{a b - b^{2}}{\sqrt{a^{3} b - 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b - b^{2}}} + x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x^4+2*a*x^2+a-b),x, algorithm="fricas")

[Out]

-1/4*sqrt(-((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2))*log((b - (a^2*b - a*b^2)/sqrt(a^3*b
- 2*a^2*b^2 + a*b^3))*sqrt(-((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2)) + x) + 1/4*sqrt(-((
a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2))*log(-(b - (a^2*b - a*b^2)/sqrt(a^3*b - 2*a^2*b^2
+ a*b^3))*sqrt(-((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) + 1)/(a*b - b^2)) + x) - 1/4*sqrt(((a*b - b^2)/sq
rt(a^3*b - 2*a^2*b^2 + a*b^3) - 1)/(a*b - b^2))*log((b + (a^2*b - a*b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3))*sqrt
(((a*b - b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3) - 1)/(a*b - b^2)) + x) + 1/4*sqrt(((a*b - b^2)/sqrt(a^3*b - 2*a^
2*b^2 + a*b^3) - 1)/(a*b - b^2))*log(-(b + (a^2*b - a*b^2)/sqrt(a^3*b - 2*a^2*b^2 + a*b^3))*sqrt(((a*b - b^2)/
sqrt(a^3*b - 2*a^2*b^2 + a*b^3) - 1)/(a*b - b^2)) + x)

________________________________________________________________________________________

Sympy [A]  time = 0.639959, size = 63, normalized size = 0.58 \begin{align*} \operatorname{RootSum}{\left (t^{4} \left (256 a^{2} b^{2} - 256 a b^{3}\right ) + 32 t^{2} a b + 1, \left ( t \mapsto t \log{\left (- 64 t^{3} a^{2} b + 64 t^{3} a b^{2} - 4 t a - 4 t b + x \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x**4+2*a*x**2+a-b),x)

[Out]

RootSum(_t**4*(256*a**2*b**2 - 256*a*b**3) + 32*_t**2*a*b + 1, Lambda(_t, _t*log(-64*_t**3*a**2*b + 64*_t**3*a
*b**2 - 4*_t*a - 4*_t*b + x)))

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x^4+2*a*x^2+a-b),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError